- @html_title ||= "#{<%= class_name %>.model_name.human}列表"
= html_buttons do
  = link_to '新增 <%= human_name %>', new_<%= singular_table_name %>_path, class: 'btn btn-xs btn-primary'

/! 搜索表单
.search_form
  - @search||= <%= class_name %>.ransack {}
  = search_form_for(@search, builder: SimpleForm::FormBuilder, class: "index_search_form") do |f|
    = hidden_field_tag :per_page, per_page
    = search_button f
/! 数据列表
table.index-data-table
  thead
    tr
<% attributes.each do |attribute| -%>
      th= <%= class_name %>.human_attribute_name :<%= attribute.name%>
<% end -%>
      th 操作
  tbody
    - @<%= plural_table_name %>.each do |<%= singular_table_name %>|
      tr
<% attributes.each do |attribute| -%>
        td = <%= singular_table_name %>.<%= attribute.name %>
<% end -%>
        td
          = link_to '查看',  <%= singular_table_name %>, class: 'btn btn-info btn-xs'
          = link_to '编辑', edit_<%= singular_table_name %>_path(<%= singular_table_name %>), class: 'btn btn-primary btn-xs push-5-l'
          = link_to '删除', <%= singular_table_name %>, data: { confirm: '确定删除吗?' }, method: :delete, class: 'btn btn-danger  btn-xs push-5-l'
= paginator_bottom @<%= plural_table_name %> if @<%= plural_table_name %>.respond_to?(:total_pages)